<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Wecome Our Tickets</title>
</head>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Dashboard Template for Bootstrap</title>
    <!-- Bootstrap core CSS -->
    <link href="asserts/css/bootstrap.css" th:href="@{/webjars/bootstrap/4.0.0/css/bootstrap.css}" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="asserts/css/bootstrap.css" th:href="@{/asserts/css/dashboard.css}" rel="stylesheet">
    <style type="assets/css">
        /* Chart.js */

        @-webkit-keyframes chartjs-render-animation {
            from {
                opacity: 0.99
            }
            to {
                opacity: 1
            }
        }

        @keyframes chartjs-render-animation {
            from {
                opacity: 0.99
            }
            to {
                opacity: 1
            }
        }

        .chartjs-render-monitor {
            -webkit-animation: chartjs-render-animation 0.001s;
            animation: chartjs-render-animation 0.001s;
        }
    </style>
</head>

<body>
<center><h1>All Tickets</h1></center>
<!--<tr th:em='${username}'>-->
<a class="btn btn-sm btn-primary" th:href="@{/albums(username=${username})}">我的收藏</a>
<a class="btn btn-sm btn-primary" th:href="@{list}">我的订单</a>
<div class="container-fluid">
    <div class="row">
        <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
            <div class="table-responsive">
                <table class="table table-striped table-sm">
                    <thead>
                    <tr>
                        <th>演唱会名字</th>
                        <th>票价</th>
                        <th>余票数量</th>
                        <th>地点</th>
                        <th>演唱会开始时间</th>
                        <th>演唱会结束时间</th>
                        <th>上架状态</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr th:each="emp:${ticket}">
                        <td th:text="${emp.getT_name()}"></td>
                        <td th:text="${emp.getT_price()}"></td>
                        <td th:text="${emp.getT_remaincount()}"></td>
                        <td th:text="${emp.getT_address()}"></td>
                        <td th:text="${emp.getT_date()+emp.getT_starttime()}"></td>
                        <td th:text="${emp.getT_date()+emp.getT_endtime()}"></td>
                        <td th:text="${emp.getT_type()}"></td>
                        <td>
                            <a class="btn btn-sm btn-primary" th:href="@{/buyticket(t_id=${emp.getT_id()},username=${username},price=${emp.getT_price()})}">购买</a>
                            <a class="btn btn-sm btn-primary" th:href="@{/albumssave(tid=${emp.getT_id()},name=${username})}">收藏</a>
                            <!--<a class="btn btn-sm btn-primary" th:href="@{/cancel(id=${orderdetail.getOrderId()})}">预订</a>
                            <a class="btn btn-sm btn-primary" th:href="@{/finish(id=${orderdetail.getOrderId()})}" >收藏</a>-->

                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </main>
        <form id="deleteEmpForm"  method="post">
            <input type="hidden" name="_method" value="delete"/>
        </form>
    </div>
</div>
</body>
</html>